<!DOCTYPE html >
<html>

	<head>
		<base href="<%=basePath%>">
		<meta http-equiv="content-type" content="text/html; charset=UTF-8">
		<title>物业商城菜单添加</title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<link rel="stylesheet" type="text/css" href="../css/public.css" />
		<link rel="stylesheet" type="text/css" href="../bootstrap/dist/css/bootstrap.css" />
		<link rel="stylesheet" type="text/css" href="../css/fileinput.min.css" />
		<style>
			#app {
				width: 100%;
				/*display: flex;*/
				/*justify-content: space-around;*/
				/*flex-wrap: wrap;*/
				padding: 10px;
			}
			
			.addBaseStore,
			.addmenu {
				/*text-align: center;*/
				min-width: 500px;
				/*height: 700px;*/
				/*border: 1px solid rebeccapurple;*/
				/*text-align: center;*/
				float: left;
				/*margin: 150px 50px;*/
				margin-top: 20px;
			}
			
			h4 {
				font: 20px/28px "";
				margin-top: 15px;
				text-align: center;
			}
			
			ul li {
				padding-top: 10px;
			}
			
			ul li input {
				/*height: 34px;*/
				padding: 0 5px;
			}
			
			p {
				margin-left: 180px;
				color: red;
			}
			
			label {
				font: 14px/34px '';
			}
			
			.addmenu span {
				display: inline-block;
				width: 70px;
				font: 12px/34px "";
				margin-left: 80px;
			}
			
			.addmenu select {
				width: 200px;
				height: 34px;
				font: 14px/34px "";
			}
			/*#sub_sure {
				width: 150px;
				height: 40px;
				font: 16px/40px "";
				border: none;
				margin-top: 50px;
			}*/
			
			s {
				color: red;
				font: 16px/34px "";
			}
			
			.addBaseStore ul span {
				display: inline-block;
				width: 100px;
				font: 12px/34px "";
				margin-left: 80px;
			}
			
			.addBaseStore ul input {
				height: 34px;
				padding: 0 5px;
				display: inline-block;
				width: 200px;
			}
			
			.te {
				display: none;
			}
			.te_te{
				display: none;
			}
			.tete {}
			/*.tete span{
				float: left;
			}
			.tete input{
				float: left;
				margin-left: 0px;
			}*/
			
			#formID {}
			
			.ul_1 {
				float: left;
				width: 50%;
				min-height: 500px;
			}
			
			.ul_2 {
				float: left;
				width: 50%;
				min-height: 500px;
			}
		</style>
	</head>

	<body>
		<div id="app">
			<div class="box-header with-border">
				<h3 class="box-title">添加菜单</h3>
			</div>
			<div class="addBaseStore" v-if="false0">
				<!--v-if="false0"-->
				<form class="clear" id="formID" :action="uplod_url" method="post" enctype="multipart/form-data" onsubmit="return sub();">
					<h4>添加商品信息</h4>
					<ul class="ul_1">
						<li>
							<span> 是否存在app:</span>
							<select @click="is_app" v-model="value1" name="isexistapp" style="display: inline-block;width: 200px;height: 34px;" class="form-control">
								<option value="0">不存在</option>
								<option value="1">存在</option>
							</select>
						</li>
						<li>
							<span>商品名称：</span>
							<input class="form-control" type="text" name="goodsname" />
						</li>
						<li>
							<span>商品价格：</span>
							<input class="form-control" type="number" name="goodsprice" />
						</li>
						<li>
							<span>描述：</span>
							<input class="form-control" type="text" name="description" />
						</li>

						<li class="te">
							<span>app名字：</span>
							<input class="form-control" type="text" name="appname" />
						</li>
						
						<li class="te">
							<span>appurl：</span>
							<input class="form-control" type="text" name="appurl" />
						</li>
						<li  class="te">
							<span> 是否存在详情:</span>
							<select @click="is_more" v-model="value2" name="" style="display: inline-block;width: 200px;height: 34px;" class="form-control">
								<option value="0">不存在</option>
								<option value="1">存在</option>
							</select>
						</li>
						<li class="te_te">
							<span>详情页url：</span>
							<input class="form-control" type="text" name="" />
						</li>
						<li style="display: none;">
							<input type="text" name="storerole" v-model="num" />
						</li>
						<li style="display: none;">
							<input type="text" name="isSon" v-model="isSon" />
						</li>
					</ul>
					<ul class="ul_2">
						<li class="tete ">
							<span>上传图片组：</span>
							<input type="file" name="file" @change="img1_show(event)" id="tupian" multiple="ture" />
							<img v-if="srcZ_img !=''" style="width: 50px;height: 50px;" :src="srcZ_img" />
						</li>
						<li class="tete ">
							<span>操作视频：</span>
							<input type="file" name="actionfile" id="actionfile" accept="video/*" />
						</li>
						<li class="te tete ">
							<span>图标(2倍)：</span>
							<input type="file" @change="img2_show(event)" name="appicon1" id="appicon" />
							<img v-if="src2_img !=''" style="width: 37.5px;height: 37.5px;" :src="src2_img" />
							<p>请上传75*75大小的图否则会造成变形失真</p>
						</li>
						<li class="te tete ">
							<span>图标(3倍)：</span>
							<input type="file" @change="img3_show(event)" name="appicon2" id="appicon3" />
							<img v-if="src3_img !=''" style="width: 56.5px;height: 56.5px;" :src="src3_img" />
							<p>请上传113*113大小的图片否则会造成变形失真</p>

						</li>
					</ul>
					<button style="display: block;margin: 0 auto;" id="aaaa" type="submit" class="btn btn-default" data-dismiss="modal">提交</button>
					<!--<input id="aaaa" style="display: block;margin: 0 auto;" type="submit" value="提交" />-->
				</form>
			</div>

			<!--<form action="system/addBaseModule" method="post">-->
			<div class="addmenu" v-if="false1">
				<!--v-if="false1"-->
				<h4>添加菜单信息</h4>
				<ul>
					<li>
						<span> 父菜单：</span>
						<select v-model="fu1" name="fu" id="fu" @change="fu_change">
							<option v-for="item in fu" :value="item.moduleid" v-text="item.fullname"></option>
						</select>
						<!--<input type="button" id="" value="增加" data-toggle="modal" data-target="#myModal" /><s>*</s>-->
						<button type="button" class="btn btn-info" data-toggle="modal" data-target="#myModal">增加</button><s>*</s>
					</li>
					<li>
						<span> 子菜单：</span>
						<select v-model="yiji1" name="yiji" id="yiji" @change="yiji_change">
							<option v-for="item in yiji" :value="item.moduleid" v-text="item.fullname "></option>
						</select>
						<!--<input type="button" id="" value="增加" data-toggle="modal" data-target="#myModal1" />-->
						<button type="button" class="btn btn-info" data-toggle="modal" data-target="#myModal1">增加</button>
					</li>
					<!--<li>
						<span> 二级菜单：</span>
						<select v-model="erji1" name="erji" id="erji">
							<option v-for="item in erji" :value="item.moduleid">{{ item.fullname }}</option>
						</select>
						<input type="button" value="增加" data-toggle="modal" data-target="#myModal2" />
					</li>-->
					<li>
						<span>链接地址：</span>
						<input style="width: 200px;height: 34px;" type="text" name="" id="" v-model="address" value="" placeholder="请输入链接地址" />
						<s>*</s>
					</li>
					<li>
						<span>选择参数：</span>
						<input type="checkbox" id="jack" value="userid" v-model="checkedNames">
						<label for="userid">用户ID</label>
						<input type="checkbox" id="john" value="realname" v-model="checkedNames">
						<label for="realname">用户姓名</label>
						<input type="checkbox" id="mike" value="merchantid" v-model="checkedNames">
						<label for="merchantid">物业公司id</label>
						<input type="checkbox" id="mike" value="areaid" v-model="checkedNames">
						<label for="areaid">小区id</label>
						<br>
						<span>参数名:</span>
						<label>{{ checkedNames }}</label>
					</li>
					<li>

					</li>
				</ul>
				<!--userid （用户id）  
				realname(用户姓名)   
				merchantid（物业公司id）
				Areaid（小区id）-->
				<!--<input style="display: block;margin: 0 auto;" id="sub_sure" @click="sub_sure" type="submit" value="提交" />-->
				<button style="display: block;margin: 0 auto;" id="sub_sure" @click="sub_sure" type="submit" class="btn btn-default">提交</button>
			</div>

			<!--</form>-->
			<!-- 模态框（Modal）添加父菜单 -->
			<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
				<div class="modal-dialog">
					<div class="modal-content">
						<div class="modal-header">
							<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
							<h4 class="modal-title" id="myModalLabel">添加父菜单</h4>
						</div>
						<div class="modal-body">
							<div class="form-group">
								<label for="name">父菜单</label>
								<input v-model="fu_input1" type="text" class="form-control" id="name" placeholder="请输入父菜单名称">
							</div>
						</div>
						<div class="modal-footer">
							<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
							<button @click="add_1" type="button" class="btn btn-primary">确定添加</button>
						</div>
					</div>
					<!-- /.modal-content -->
				</div>
				<!-- /.modal -->
			</div>
			<!-- 模态框（Modal）添加一级菜单 -->
			<div class="modal fade" id="myModal1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
				<div class="modal-dialog">
					<div class="modal-content">
						<div class="modal-header">
							<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
							<h4 class="modal-title" id="myModalLabel">添加一级菜单</h4>
						</div>
						<div class="modal-body">
							<div class="form-group">
								<label for="name">一级菜单</label>
								<input v-model="fu_input2" type="text" class="form-control" id="name" placeholder="请输入一级菜单名称">
							</div>
						</div>
						<div class="modal-footer">
							<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
							<button @click="add_2" type="button" class="btn btn-primary">确定添加</button>
						</div>
					</div>
					<!-- /.modal-content -->
				</div>
				<!-- /.modal -->
			</div>

			<!-- 模态框（Modal）添加二级菜单 -->
			<div class="modal fade" id="myModal2" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
				<div class="modal-dialog">
					<div class="modal-content">
						<div class="modal-header">
							<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
							<h4 class="modal-title" id="myModalLabel">添加二级菜单</h4>
						</div>
						<div class="modal-body">
							<div class="form-group">
								<label for="name">二级菜单</label>
								<input v-model="fu_input3" type="text" class="form-control" id="name" placeholder="请输入二级菜单名称">
							</div>
						</div>
						<div class="modal-footer">
							<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
							<button @click="add_3" type="button" class="btn btn-primary">确定添加</button>
						</div>
					</div>
					<!-- /.modal-content -->
				</div>
				<!-- /.modal -->
			</div>

			<!--<h2>创建模态框（Modal）</h2>-->
			<!-- 模态框（Modal） -->
			<div class="modal fade" id="myModal_xianshi" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
				<div class="modal-dialog">
					<div class="modal-content">
						<div class="modal-header">
							<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
							<h4 class="modal-title" id="myModalLabel">提交成功返回重要信息（请务必保存）</h4>
						</div>
						<div class="modal-body">
							<lable>appid:</lable>
							<input id="very_in" type="text" disabled="disabled" class="form-control">
							<lable>privatekey:</lable>
							<input id="very_in_1" type="text" disabled="disabled" class="form-control">

						</div>
						<div class="modal-footer">
							<button type="button" class="btn btn-default" @click="guanbi">关闭</button>
							<!--<button type="button" class="btn btn-primary">提交更改</button>-->
						</div>
					</div>
					<!-- /.modal-content -->
				</div>
				<!-- /.modal -->
			</div>
			<!-- 模态框（Modal）提示信息 -->
			<div class="modal fade" id="myModal_tips" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
				<div class="modal-dialog">
					<div class="modal-content">
						<div class="modal-header">
							<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
							<h4 class="modal-title" id="myModalLabel">提示信息</h4>
						</div>
						<div class="modal-body" id="tips" v-text="tips_modal">

						</div>
						<div class="modal-footer">
							<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
						</div>
					</div>
				</div>
			</div>

		</div>

	</body>

</html>
<script src="../js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../js/vue.js" type="text/javascript" charset="utf-8"></script>
<script src="../bootstrap/dist/js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../js/form.js" type="text/javascript" charset="utf-8"></script>
<script src="../js/public.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
	function sub() {
		$('#aaaa').attr('disabled', true);
		$("#aaaa").text("上传中...")
		$("#formID").ajaxSubmit(function(message) {
			console.log(message)
			if(message.code == 0) {
				$('#myModal_xianshi').modal('show');
				$("#very_in").val(message.data.appid)
				$("#very_in_1").val(message.data.privatekey);
				$("#aaaa").text("上传成功")
			} else {
				//				alert(message.msg)
				$('#myModal').modal('show');
				$("#tips").html(message.msg)
				$('#aaaa').attr("disabled", false);
				$("#aaaa").text("提交")
			}

			// 对于表单提交成功后处理，message为提交页面saveReport.htm的返回内容 
		});
		return false; // 必须返回false，否则表单会自己再做一次提交操作，并且页面跳转 
	}
</script>
<script>
	//	var urlr = "http://192.168.0.30:8085"
	new Vue({
		el: '#app',

		data: {
			srcZ_img: "",
			src2_img: "",
			src3_img: "",
			value2:0,
			value1: 0,
			isSon:"",
			false0: false,
			false1: true,
			myvideo_src: "",
			uplod_url: "",
			checkedNames: [],
			urlr: "",
			tips_modal: "",
			fu1: "",
			fu: [{
				moduleid: "",
				fullname: ""
			}, ],
			yiji1: "0",
			yiji: [{
				moduleid: 0,
				fullname: "请选择一级菜单"
			}, ],
			erji1: "0",
			erji: [{
				moduleid: 0,
				fullname: "请选择二级菜单"
			}, ],
			fu_input1: "",
			fu_input2: "",
			fu_input3: "",
			address: "",
			storerole: "",
			num: ""

		},

		mounted: function() {

		},
		created: function() {
			var that = this;
			that.urlr = getUrl_yangli();
			that.uplod_url = getUrl_yangli() + "/system/addBaseStore";
			console.log(that.uplod_url)
			console.log(that.urlr)
			//获取父菜单
			that.huoqu_fu();
		},
		methods: {
			//关闭
			guanbi: function() {
				$('#myModal_xianshi').modal('hide');
				window.location.reload()
			},
			is_app: function() {
				//				debugger
				var aa = this.value1;
				//				console.log(aa)
				if(aa == 1) {
					$(".te").css('display', 'block');
				} else {
					$(".te").css('display', 'none');
				}
			},
			is_more:function(){
				var aa = this.value2;
				//				console.log(aa)
				if(aa == 1) {
					$(".te_te").css('display', 'block');
				} else {
					$(".te_te").css('display', 'none');
				}
			},
			huoqu_fu: function() {
				var that = this;
				$.ajax({
					contentType: "application/json; charset=utf-8",
					type: "GET",
					url: that.urlr + "/system/getParentModule",
					data: "",
					async: true,
					dataType: "json",
					success: function(msg) {
						console.log(msg);
						if(msg.code == 0) {
							if(msg.data == "") {
								var aa = [];
								var te = {
									fullname: '请选择父级菜单',
									moduleid: "0"
								}
								aa.unshift(te);
								that.fu = aa;
								that.fu1 = that.fu[0].moduleid;
							} else {
								var aa = msg.data;
								var te = {
									fullname: '请选择父级菜单',
									moduleid: "0"
								}
								aa.unshift(te);
								console.log(aa);
								that.fu = aa;
								that.fu1 = that.fu[0].moduleid;
							}

						} else {
							//							alert(msg.msg)
							that.tips_modal = msg.msg;
							$('#myModal_tips').modal('show');
						}
					},
					error: function() {
						//						alert("获取信息失败");
						that.tips_modal = "获取信息失败";
						$('#myModal_tips').modal('show');
					}
				});
			},
			//父菜单改变
			fu_change: function() {
				//				debugger
				var that = this;
				var aa = {
					moduleid: that.fu1,

				};
				var data = JSON.stringify(aa);
				$.ajax({
					contentType: "application/json; charset=utf-8",
					type: "POST",
					url: that.urlr + "/system/getBaseModuleById",
					data: data,
					async: true,
					dataType: "json",
					success: function(msg) {
						console.log(msg);
						if(msg.code == 0) {
							var aa = msg.data;
							var te = {
								fullname: '请选择一级菜单',
								moduleid: "0"
							}
							aa.unshift(te);
							console.log(aa);
							that.yiji = aa;
							that.yiji1 = that.yiji[0].moduleid;
							console.log(that.yiji)
						} else {
							//							alert(msg.msg)
							that.tips_modal = msg.msg;
							$('#myModal_tips').modal('show');
						}
					},
					error: function() {
						//						alert("获取信息失败");
						that.tips_modal = "获取信息失败";
						$('#myModal_tips').modal('show');
					}
				});
			},
			//一级菜单改变显示二级菜单
			yiji_change: function() {
				//				debugger
				var that = this;
				var aa = {
					moduleid: that.yiji1,

				};
				var data = JSON.stringify(aa);
				$.ajax({
					contentType: "application/json; charset=utf-8",
					type: "POST",
					url: that.urlr + "/system/getBaseModuleById",
					data: data,
					async: true,
					dataType: "json",
					success: function(msg) {
						console.log(msg);
						if(msg.code == 0) {
							var aa = msg.data;
							var te = {
								fullname: '请选择二级菜单',
								moduleid: "0"
							}
							aa.unshift(te);
							console.log(aa);
							that.erji = aa;
							that.erji1 = that.erji[0].moduleid;
							console.log(that.erji)
						} else {
							//							alert(msg.msg)
							that.tips_modal = msg.msg;
							$('#myModal_tips').modal('show');
						}
					},
					error: function() {
						//						alert("获取信息失败");
						that.tips_modal = "获取信息失败";
						$('#myModal_tips').modal('show');
					}
				});
			},

			add_1: function() {
				//								debugger
				var that = this;
				if(that.fu_input1 == "") {
					//					alert("请把信息填写完成！")
					that.tips_modal = "请把信息填写完成";
					$('#myModal_tips').modal('show');
					return
				} else {
					var aa = {
						parentid: "0",
						fullname: that.fu_input1,
						urladdress: null,
						encode: "1",
					};
					var data = JSON.stringify(aa);
					$.ajax({
						contentType: "application/json; charset=utf-8",
						type: "POST",
						url: that.urlr + "/system/addBaseModule",
						data: data,
						async: true,
						dataType: "json",
						success: function(msg) {
							console.log(msg);
							if(msg.code == 0) {
								$('#myModal').modal('hide');
								var aa = msg.data.data;
								var te = {
									fullname: '请选择父级菜单',
									moduleid: "0"
								}
								aa.unshift(te);
								console.log(aa);
								that.fu = aa;
								that.fu1 = that.fu[0].moduleid;
							} else {
								//								alert(msg.msg)
								that.tips_modal = msg.msg;
								$('#myModal_tips').modal('show');
							}
						},
						error: function() {
							//							alert("获取信息失败");
							that.tips_modal = "请把信息填写完成";
							$('#myModal_tips').modal('show');
						}
					});
				}

			},
			add_2: function() {
				var that = this;
				var parentid = that.fu1;
				if(parentid == 0) {
					//					alert("请先选择父菜单！");
					that.tips_modal = "请先选择父菜单";
					$('#myModal_tips').modal('show');
				} else {
					if(that.fu_input2 == "") {
						//						alert("请把信息填写完成！")
						that.tips_modal = "请把信息填写完成";
						$('#myModal_tips').modal('show');
					} else {
						$('#myModal1').modal("show");
						var aa = {
							parentid: parentid,
							fullname: that.fu_input2,
							urladdress: null,
							encode: "1",
						};
						var data = JSON.stringify(aa);
						$.ajax({
							contentType: "application/json; charset=utf-8",
							type: "POST",
							url: that.urlr + "/system/addBaseModule",
							data: data,
							async: true,
							dataType: "json",
							success: function(msg) {
								console.log(msg);
								if(msg.code == 0) {
									$('#myModal1').modal('hide');
									var aa = msg.data.data;
									var te = {
										fullname: '请选择一级菜单',
										moduleid: "0"
									}
									aa.unshift(te);
									console.log(aa);
									that.yiji = aa;
									that.yiji1 = that.yiji[0].moduleid;
								} else {
									//									alert(msg.msg)
									that.tips_modal = msg.msg;
									$('#myModal_tips').modal('show');
								}
							},
							error: function() {
								//								alert("获取信息失败");
								that.tips_modal = "获取信息失败";
								$('#myModal_tips').modal('show');
							}
						});
					}
				}

			},
			add_3: function() {
				var that = this;
				var parentid = that.yiji1;
				if(parentid == 0) {
					//					alert("请先选择一级菜单！");
					that.tips_modal = "请先选择一级菜单";
					$('#myModal_tips').modal('show');
				} else {
					if(that.fu_input3 == "") {
						//						alert("！")
						that.tips_modal = "请把信息填写完成！";
						$('#myModal_tips').modal('show');
					} else {
						$('#myModal2').modal("show");
						var aa = {
							parentid: parentid,
							fullname: that.fu_input3,
							urladdress: null,
							encode: "1",
						};
						var data = JSON.stringify(aa);
						$.ajax({
							contentType: "application/json; charset=utf-8",
							type: "POST",
							url: that.urlr + "/system/addBaseModule",
							data: data,
							async: true,
							dataType: "json",
							success: function(msg) {
								console.log(msg);
								if(msg.code == 0) {
									$('#myModal2').modal('hide');
									var aa = msg.data.data;
									var te = {
										fullname: '请选择一级菜单',
										moduleid: "0"
									}
									aa.unshift(te);
									console.log(aa);
									that.erji = aa;
									that.erji1 = that.yiji[0].moduleid;
								} else {
									//									alert()
									that.tips_modal = msg.msg;
									$('#myModal_tips').modal('show');
								}
							},
							error: function() {
								//								alert("获取信息失败");
								that.tips_modal = "请把信息填写完成！";
								$('#myModal_tips').modal('show');
							}
						});
					}
				}
			},

			//信息填写完毕   提交
			sub_sure: function() {
				debugger
				var that = this;				
				if(that.yiji1!='0'){
					that.isSon=1
				}else{
					that.isSon=0
				}
				if(that.fu1 == "0" || that.address == "") {
					//					alert("请将信息完整填写！")
					that.tips_modal = "请将信息完整填写！";
					$('#myModal_tips').modal('show');
				} else {
					if(that.erji1 != "0") {
						debugger
						parentid = that.erji1;
						fullname = $("#erji  option:selected").text();
						that.submit1(parentid, fullname);
					} else {
						parentid = that.yiji1;
						fullname = $("#yiji  option:selected").text();
						that.submit1(parentid, fullname);
					}
				}
			},
			//提交
			submit1: function(data, data1) {			
				var that = this;
				var aa = JSON.stringify(that.checkedNames);
				var arr = that.checkedNames;
				var list = {};
				list = arr.join();
				console.log(list);
				var num = createTimestamp() + createNonceStr();
				console.log(num);
				that.num = num;
				var data = {
					fullname: data1,
					moduleid: data,
					urladdress: "/#/iframe?onUrl=" + that.address,
					target: list,
					storerole: num
				}
				var data = JSON.stringify(data);
				$.ajax({
					contentType: "application/json; charset=utf-8",
					type: "POST",
					url: that.urlr + "/system/updateBaseModule",
					data: data,
					async: true,
					dataType: "json",
					success: function(msg) {
						console.log(msg);
						if(msg.code == 0) {
							console.log(msg)
							//							alert("提交成功");
							that.tips_modal = "提交成功！";
							$('#myModal_tips').modal('show');
							that.false1 = false;
							that.false0 = true;
						} else {
							//							alert(msg.msg)
							that.tips_modal = msg.msg;
							$('#myModal_tips').modal('show');
						}
					},
					error: function() {
						//						alert("获取信息失败");
						that.tips_modal = "获取信息失败！";
						$('#myModal_tips').modal('show');
					}
				});
			},
			//图片预览
			img1_show: function(e) {
				debugger
				var that = this;
				var file = e.target.files[0];
				var imgSize = file.size / 1024;

				var reader = new FileReader();
				reader.readAsDataURL(file); // 读出 base64
				// 图片的 base64 格式, 可以直接当成 img 的 src 属性值       
				reader.onload = function(e) {
					console.log(e)
					var dataURL = reader.result;
					console.log(dataURL)
					that.srcZ_img = dataURL;
				}
			},
			//图片预览
			img2_show: function(e) {
				var that = this;
				var file = e.target.files[0];
				var imgSize = file.size / 1024;

				var reader = new FileReader();
				reader.readAsDataURL(file); // 读出 base64
				// 图片的 base64 格式, 可以直接当成 img 的 src 属性值       
				reader.onload = function(e) {
					console.log(e)
					var dataURL = reader.result;
					console.log(dataURL)
					that.src2_img = dataURL;
				}
			},
			//图片预览
			img3_show: function(e) {
				var that = this;
				var file = e.target.files[0];
				var imgSize = file.size / 1024;

				var reader = new FileReader();
				reader.readAsDataURL(file); // 读出 base64
				// 图片的 base64 格式, 可以直接当成 img 的 src 属性值       
				reader.onload = function(e) {
					console.log(e)
					var dataURL = reader.result;
					console.log(dataURL)
					that.src3_img = dataURL;
				}
			},

		}
	})
</script>
<!--<script type="text/javascript">
	function upload() { 
		mydata = document.getElementById("tupian").files; 
		formData = new FormData(); 
		formData.append("mydata", mydata);  
		console.log(formData.mydata)
		$.ajax({       
			contentType: "multipart/form-data",
			       url: "/adata/adata/payment/PaymentAction/upload.menu?_pathName=/adata//payment.jsp",
			       type: "POST",
			       data: formData,
			       dataType: "text",
			       processData: false, // 告诉jQuery不要去处理发送的数据 
			       contentType: false, // 告诉jQuery不要去设置Content-Type请求头 
			       success: function(result) {       
				alert(result); 
			} 
		});
	}
</script>-->